/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.powersearch;


import java.util.ArrayList;
import java.util.Arrays;


/**
 *
 * @author rejun001
 */
public class NoiseWords
{

    String[] stdNoiseWords =
    {
        "about" , "after" , "all" , "also" , "an" , "and" , "another" , "any" , "are" , "as" , "at" , "be" , "because" , "been" , "before" ,
        "being" , "between" , "both" , "but" , "by" , "came" , "can" , "come" , "could" , "did" , "do" , "each" , "for" , "from" , "get" ,
        "got" , "has" , "had" , "he" , "have" , "her" , "here" , "him" , "himself" , "his" , "how" , "if" , "in" , "into" , "is" , "it" , "like" ,
        "make" , "many" , "me" , "might" , "more" , "most" , "much" , "must" , "my" , "never" , "now" , "of" , "on" , "only" , "or" , "other" ,
        "our" , "out" , "over" , "said" , "same" , "see" , "should" , "since" , "some" , "still" , "such" , "take" , "than" , "that" ,
        "the" , "their" , "them" , "then" , "there" , "these" , "they" , "this" , "those" , "through" , "to" , "too" , "under" , "up" ,
        "very" , "was" , "way" , "we" , "well" , "were" , "what" , "where" , "which" , "while" , "who" , "with" , "would" , "you" , "your" , "a" ,
        "b" , "c" , "d" , "e" , "f" , "g" , "h" , "i" , "j" , "k" , "l" , "m" , "n" , "o" , "p" , "q" , "r" , "s" , "t" , "u" , "v" , "w" , "x" , "y" , "z" , 
        "$" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "0" , "_" , "-"
    };
    String[] customNoiseWords =
    {
        "economic" ,
        "survey" ,
        "census" ,
        "econ" ,
        "cosa" ,
        "$$00" ,
        "form" ,
        "test" ,
        "null value"
    };
    ArrayList<String> noiseList = new ArrayList<>();


    public NoiseWords()
    {
        noiseList.addAll( Arrays.asList( stdNoiseWords ) );
        noiseList.addAll( Arrays.asList( customNoiseWords ) );
    }


    public ArrayList<String> getNoiseList()
    {
        return noiseList;
    }
    
    public boolean isNoise(String toCheck) {
        boolean noise = false;
        if (noiseList.contains( (String) toCheck.toLowerCase())) {
            noise = true; 
        }
        return noise;
    }
    
}
